<p class="Paragraph">FileName: Any numeric expression that contains the file number set by the Open statement for the respective file.</p>
<p class="Paragraph">Expressionlist: Variables or expressions to be entered in a file, separated by commas.</p>
<p class="Paragraph">If the expression list is omitted, the <span class="T1">Write#</span> statement appends an empty line to the file.</p>
<p class="Paragraph">To add an expression list to a new or existing file, the file must be opened in the <span class="T1"><text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>Output</span> or <span class="T1">Append</span> mode.</p>
<p class="Paragraph">The <span class="T1">Write#</span> statement enters data enclosed by quotation marks and separated by commas into a file. Opposed to the <span class="T1">Print#</span> statement, it is not necessary to use delimiters in the list. The end of a file created with the <span class="T1">Write#</span> statement is indicated by a line end symbol.</p>
<p class="P2">Example:</p>
<p class="PropText">Sub ExampleWrite</p>
<p class="PropText">Dim iCount As Integer</p>
<p class="PropText">Dim sValue As String</p>
<p class="PropText">iCount = Freefile</p>
<p class="PropText">open "C:\data.txt" for OutPut as iCount</p>